public class FuncDefine extends Quaternion {
    private Pairs func;
    private Pairs param;
    private int type;   //0:func 1: param
    private int dim;

    public FuncDefine(Pairs func, Pairs param, int type) {
        super(OP.FUNC);
        this.func = func;
        this.param = param;
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public Pairs getFunc() {
        return this.func;
    }

    public Pairs getParam() {
        return this.param;
    }

    public String toString() {
        if (type == 0) {
            return func.getType() + " " + func.getToken() + "()" + "\n";
        } else {
            return "para" + " " + param.getType() + " " + param.getToken() + "\n";
        }
    }
}
